<template>
  <div>
    <el-container>
      <el-header>Header</el-header>
      <el-container>
        <div>
          <el-radio-group
            v-model="isCollapse"
            style="margin-bottom: 20px; height: 40px"
          >
            <el-radio-button :label="false" size="mini">展开</el-radio-button>
            <el-radio-button :label="true" size="mini">收起</el-radio-button>
          </el-radio-group>
          <el-menu default-active="1-4-1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose"
            :collapse="isCollapse" style="height: 600px;">
            <el-submenu index="1">
              <template slot="title">
                <i class="el-icon-document-add"></i>
                <span slot="title">门诊部</span>
              </template>
              <el-menu-item-group>
                <router-link to="/Home/Register">
                  <el-menu-item index="1-1">挂号管理</el-menu-item>
                </router-link>
              </el-menu-item-group>
            </el-submenu>

            <el-submenu index="2">
              <template slot="title">
                <i class="el-icon-office-building"></i>
                <span slot="title">住院部</span>
              </template>
              <el-menu-item-group>
                <router-link to="/Home/HospitalApply">
                  <el-menu-item index="2-1"><li>入院登记</li></el-menu-item>
                </router-link>
                <router-link to="/Home/Hospitalized">
                  <el-menu-item index="2-2"><li>住院管理</li></el-menu-item>
                </router-link>
                <router-link to="/Home/HospitalOperation">
                  <el-menu-item index="2-4"><li>手术记账</li></el-menu-item>
                </router-link>
                <router-link to="/Home/">
                  <el-menu-item index="2-5"><li>项目记账</li></el-menu-item>
                </router-link>
                <router-link to="/Home/Sickroom">
                  <el-menu-item index="4-1"><li>病房管理</li></el-menu-item>
                </router-link>
              </el-menu-item-group>
            </el-submenu>

            <el-submenu index="3">
              <template slot="title">
                <i class="el-icon-document"></i>
                <span slot="title">基本数据</span>
              </template>
              <el-menu-item-group>
                <router-link to="/Home/Medicine">
                  <el-menu-item index="3-1"><li>药品管理</li></el-menu-item>
                </router-link>
                <router-link to="/Home/Check">
                  <el-menu-item index="3-2"><li>检查管理</li></el-menu-item>
                </router-link>
                <router-link to="/Home/Operation">
                  <el-menu-item index="3-3"><li>手术管理</li></el-menu-item>
                </router-link>
              </el-menu-item-group>
            </el-submenu>

            <el-submenu index="4">
              <template slot="title">
                <i class="el-icon-user"></i>
                <span slot="title">用户管理</span>
              </template>
              <el-menu-item-group>
                <router-link to="/Home/User">
                  <el-menu-item index="4-1"><li>用户管理</li></el-menu-item>
                </router-link>
                <router-link to="/Home/Patient">
                  <el-menu-item index="4-2"><li>病人管理</li></el-menu-item>
                </router-link>
                <router-link to="/Home/DoctorSort">
                  <el-menu-item index="4-3"><li>出诊排班</li></el-menu-item>
                </router-link>
              </el-menu-item-group>
            </el-submenu>

            <el-submenu index="5">
              <template slot="title">
                <i class="el-icon-setting"></i>
                <span slot="title">系统管理</span>
              </template>
              <el-menu-item-group>
                <router-link to="/Home/Role">
                  <el-menu-item index="5-1"><li>角色管理</li></el-menu-item>
                </router-link>
                <router-link to="/Home/User">
                  <el-menu-item index="5-2"><li>用户管理</li></el-menu-item>
                </router-link>
                <router-link to="/Home/Dept">
                  <el-menu-item index="5-3"><li>科室管理</li></el-menu-item>
                </router-link>
                <router-link to="/Home/Permission">
                  <el-menu-item index="5-4"><li>权限管理</li></el-menu-item>
                </router-link>
              </el-menu-item-group>
            </el-submenu>
          </el-menu>
        </div>

        <el-container>
          <el-main>
            <router-view />
          </el-main>
          <el-footer>Footer</el-footer>
        </el-container>
      </el-container>
    </el-container>
  </div>
</template>

<style scoped>
a {
  color: rgb(117, 204, 228);
  text-decoration: none;
}

* {
  margin: 0;
  padding: 0;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  font-size: 16px;
}
.el-header,
.el-footer {
  background-color: #d3f1ff;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  /* background-color: #D3DCE6; */
  color: #333;
}

.el-main {
  /* background-color: #E9EEF3; */
  color: #333;
  /* text-align: center; */
  height: 848px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  /* line-height: 260px; */
}

.el-container:nth-child(7) .el-aside {
  /* line-height: 320px; */
}

.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 400px;
}
</style>

<script>
export default {
  data() {
    return {
      isCollapse: true,
    };
  },
  methods: {
    handleOpen(key, keyPath) {},
    handleClose(key, keyPath) {},
  },
};
</script>
